import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./assets/css/reset.css";
import "./assets/css/iconfont.css";

import axios from "axios";
Vue.prototype.$axios = axios;
import http from "./api/http.js";
Vue.prototype.$http = http;

Vue.config.productionTip = false;

router.beforeEach((to, from, next) => {
  // console.log(to)
  // 控制导航的显示隐藏
  // if (to.name == "login") {
  //   store.commit("changeShow", false);
  // } else {
  //   store.commit("changeShow", true);
  // }
  store.commit('changeShow',to.meta.isTopNab);
  next();
});

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
